import requests from "./axios";

export const phoneLogin = (data) => requests({ url: '/client/login', 'data': data, method: 'post' });  //登录
export const loginCode = (data) => requests({ url: '/client/sendSms', 'params': data, method: 'post' });  //获得登录验证码
export const verifyPhone = (data) => requests({ url: '/system/user/client/verifyPhone', 'params': data, method: 'post' });  //获得登录验证码
export const switchPhone = (data) => requests({ url: '/system/user/client/switchPhone', 'params': data, method: 'post' });
export const switchPhoneSendSms = (data) => requests({ url: '/client/switchPhoneSendSms', 'params': data, method: 'post' });
export const totalwenjuanList = (data) => requests({ url: `/hcem/title/list`, 'params': data, method: 'get' });   //问卷列表
export const wenjuanDetails = (id: string) => requests({ url: `/hcem/title/${id}`, method: 'get' });  //问卷详情
export const totaldajuanList = (data) => requests({ url: `/hcem/content/client/topicContentList`, 'params': data, method: 'get' });  //答卷管理
export const juanListDetails = (id) => requests({ url: `/hcem/content/client/getContent/${id}`,method: 'get' });  //答卷管理详情
export const totalLinkSoureList = () => requests({ url: '/hcem/source/client/list', method: 'get' });   //链接列表
export const addLinkSoureList = (res) => requests({ url: '/hcem/source','data':res ,method: 'post'});  //添加链接
export const userPost = (data) => requests({ url: '/hcem/content',data,method: 'post'});  //用户提交表单
export const linklist = (data) => requests({ url: '/hcem/link/client/list','params': data,method: 'get'});
export const linkChangeStatus = (data) => requests({ url: '/hcem/link','data': data,method: 'put'});
export const linkDelete = (id) => requests({ url: `/hcem/link/${id}`,method: 'delete'});
export const docManage = (data) => requests({ url: '/hcem/doctor/client/list','params': data,method: 'get'});  //医生列表
export const docPostData = (data) => requests({ url: '/hcem/doctor/client/doctorUpdateOrAdd',data,method: 'post'});  //添加医生
export const getRoles = () => requests({ url: '/system/user/',method: 'get'});  //角色列表
export const getEditorInfo = (id:string) => requests({ url: `/hcem/doctor/${id}`,method: 'get'});  //获得编辑医生详情
export const getproto = (type:number) => requests({ url: `/hcem/doc/client/getInfoByType/${type}`,method: 'get'});   //两个协议
export const howToUse = () => requests({ url: '/hcem/guide/client/list',method: 'get'}); 
export const depInfo = (id) => requests({ url: `/hcem/dept/client/dept/home/${id}`,method: 'get'}); 
export const systemUsers = () => requests({ url: '/system/user/client/list',method: 'get'}); 
export const topicDoctorList = (id) => requests({ url: `/hcem/doctor/client/topicDoctorList/${id}`,method: 'get'}); 
export const assistant = () => requests({ url: `/hcem/dept/client/dept/assistant`,method: 'get'}); 
export const viewCount = (linkId) => requests({ url: `/hcem/link/client/linkCount/${linkId}`,method: 'post'});
export const depInfoView = (id) => requests({ url: `/hcem/dept/${id}`,method: 'get'});
export const positionView = () => requests({ url: '/system/dict/data/type/doctor_title',method: 'get'});
export const getbumenList = () => requests({ url: '/system/dept/list',method: 'get'});
export const addSubList = (data) => requests({ url: '/system/user/client/add',data,method: 'post'});
export const editorSub = (userId) => requests({ url: `/system/user/clientGetInfo/${userId}`,method: 'get'});
export const editorSubDetails = (data) => requests({ url: `/system/user/client/edit`,data,method: 'put'});
export const topicStatistics = (data) => requests({ url: `/hcem/statistics/client/topicStatistics?period=${data}`,method: 'get'})
export const getLinkType = (data = 1) => requests({ url: `/hcem/topic/getLinkType/${data}`,method: 'get'})
export const getpoint = (data = 1) => requests({ url: `/hcem/topic/getKeyWord/${data}`,method: 'get'})
export const dataStatisticsOne = (data = 'year') => requests({ url: `/hcem/statistics/client/dataStatisticsOne/?period=${data}`,method: 'get'})
export const dataStatisticsTwo = (data = {year:'2023',linkType:0}) => requests({ url: `/hcem/statistics/client/dataStatisticsTwo?period=${data.year}&linkType=${data.linkType}`,method: 'get'})
export const dataStatisticsThree = (data = {year:'2023',linkType:'',keyWord:''}) => requests({ url: `/hcem/statistics/client/dataStatisticsThree?period=${data.year}&linkType=${data.linkType}&keyWord=${data.keyWord}`,method: 'get'})
export const linkStatus = (linkId) => requests({ url: `/hcem/link/query/linkStatus/${linkId}`,method: 'get'})  //判断链接状态
export const linkCount = (linkId) => requests({ url: `/hcem/link/client/linkCount/${linkId}`,method: 'post'})  //计数

export const getAnswer = (data) => requests({ url: `/hcem/content/getAnswerInfo/${data}`,method: 'get'})  //获得答案

//  
// export cost totalwenjuanLi = (data) =>requests({url:`/hcem/title/list`,data,method:'post'});
// export const reqAddOrUpdateShopCart = (skuId,skuNum)=>requests({url:`/cart/addToCart/${skuId}/${skuNum}`,method:"post"})

// export const reqDeleteCartById = (skuId)=>requests({url:`/cart/deleteCart/${skuId}`,method:'delete'});
